<html>
<!--
 -  
 -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 -  project.
 -  
 -  Copyright (C) 1998-2025 OpenLink Software
 -  
 -  This project is free software; you can redistribute it and/or modify it
 -  under the terms of the GNU General Public License as published by the
 -  Free Software Foundation; only version 2 of the License, dated June 1991.
 -  
 -  This program is distributed in the hope that it will be useful, but
 -  WITHOUT ANY WARRANTY; without even the implied warranty of
 -  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
 -  General Public License for more details.
 -  
 -  You should have received a copy of the GNU General Public License along
 -  with this program; if not, write to the Free Software Foundation, Inc.,
 -  51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
 -  
 -  
-->
<head>
  <script language="JavaScript" src="../ajax_inc/ajax.js"></script>
  <script language="JavaScript" src="../ajax_inc/proxy.vsp?wsdl_path=services/services.wsdl&xslt_type=complex"></script>

   <link rel="stylesheet" type="text/css" href="/tutorial/services/demo.css">

<SCRIPT language="JavaScript">
var int_rawxml=0;


function mResultsAjax(result)
{
  document.getElementById('divResultContainer').innerHTML=result;
}

function dWait(dowhat){
  if(dowhat=='show'){
    document.getElementById('divWait').style.visibility='visible';
  }else{
    document.getElementById('divWait').style.visibility='hidden';
  }
}
</SCRIPT>   
</head>
<body>
<H3>Amazon Web APIs demo</H3>

<form method=POST >
<table border=0 class="tableentry">

<tr>
 <td>1.</td>
 <td>Get developer key:</td>
 <td>See
 <a target="_blank" href="https://associates.amazon.com/exec/panama/associates/join/developer/application.html/ref=ac_blrb/102-0794810-8288904">Amazon Web API</a> page
 </td>
</tr>

<tr>
 <td>2.</td>
 <td>Enter developer key:</td>
 <td><input type="text" name="devtag" id="devtag" size="24" value="1KRHB8C1WSKT2RZB21R2"></td>
</tr>
<tr>
 <td>3.</td>
 <td>Show Response as XML:</td>
 <td>
   <input type=checkbox name="rawxml" id="rawxml" onClick="int_rawxml=Number(this.checked);">
 </td>
</tr>

<tr>
 <td valign="top">4.</td>
 <td>Select Area:</td>
<td><select name="mode" id="mode">
        <option value="baby">Baby
        <option value="books" selected>Books
        <option value="classical">Classical Music
        <option value="dvd">DVD
        <option value="electronics">Electronics
        <option value="garden">Outdoor Living
        <option value="kitchen">Kitchen &amp; Housewares
        <option value="magazines">Magazines
        <option value="music">Popular Music
        <option value="pc-hardware">Computers
        <option value="photo">Camera &amp; Photo
        <option value="software">Software
        <option value="toys">Toys &amp; Games
        <option value="universal">Tools &amp; Hardware
        <option value="vhs">Video
        <option value="videogames">Computer &amp; Video Games
</select>
 </td>
</tr>
<tr>
 <td valign="top">5.</td>
 <td>Enter a keyword:</td>
 <td><input type="text" name="keyword" id="keyword" value="SOAP" size="15">
 </td>
</tr>

<tr>
 <td valign="top">6.</td>
 <td>Do search:</td>
 <td><input type="button" name="search" value="Search" onClick="ajax.Start(KeywordSearchRequest,'');"></td>
</tr>

</form>
      <script defer="defer" type="text/javascript">
          var KeywordSearchRequest = {
            delay: 200,
            prepare: function() {dWait('show');return Array(document.getElementById('keyword').value,document.getElementById('mode').value,document.getElementById('devtag').value,int_rawxml);},
            call: proxies.SOAP.AmazonSearchService_KeywordSearchRequest,
            finish: function(p){dWait('hide');mResultsAjax(p);},
            onException: proxies.alertException
          }
      </script>

</table>
<br>
<DIV ID="divWait" style="visibility:hidden;"><font color="red">Please wait...</font></DIV>
<hr>
<DIV ID="divResultContainer"></DIV>

</body>
</html>
